<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>SimpleRobot: Model类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SimpleRobot
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">简易四轴机器人动画</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="class_model-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Model类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>机器人数据模型  
 <a href="class_model.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="model_8h_source.html">model.h</a>&gt;</code></p>
<div class="dynheader">
类 Model 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_model.png" usemap="#Model_map" alt=""/>
  <map id="Model_map" name="Model_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a639d17254535dbda93359bed8722e6c7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a639d17254535dbda93359bed8722e6c7"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> { <b>MASTER_ROTATE</b> =0, 
<b>ASSISTANT_ROTATE</b> =1, 
<b>BAR_ROTATE</b> =2, 
<b>BAR_MOVE</b> =3
 }</td></tr>
<tr class="memdesc:a639d17254535dbda93359bed8722e6c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">动作类型 <br /></td></tr>
<tr class="separator:a639d17254535dbda93359bed8722e6c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a997cd2b5b12b228bfbcdc1829e75352b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a997cd2b5b12b228bfbcdc1829e75352b"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a997cd2b5b12b228bfbcdc1829e75352b">ModelType</a> { <b>BASE</b> =0, 
<b>MASTER</b> =1, 
<b>ASSISTANT</b> =2, 
<b>BAR</b> =3
 }</td></tr>
<tr class="memdesc:a997cd2b5b12b228bfbcdc1829e75352b"><td class="mdescLeft">&#160;</td><td class="mdescRight">模型部位 <br /></td></tr>
<tr class="separator:a997cd2b5b12b228bfbcdc1829e75352b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae3b375de5f6df4faf74a95d64748e048"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3b375de5f6df4faf74a95d64748e048"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ae3b375de5f6df4faf74a95d64748e048">Model</a> ()</td></tr>
<tr class="memdesc:ae3b375de5f6df4faf74a95d64748e048"><td class="mdescLeft">&#160;</td><td class="mdescRight">A constructor. <br /></td></tr>
<tr class="separator:ae3b375de5f6df4faf74a95d64748e048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6ebd2062a0b823db841a0b88baac4c0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6ebd2062a0b823db841a0b88baac4c0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ad6ebd2062a0b823db841a0b88baac4c0">~Model</a> ()</td></tr>
<tr class="memdesc:ad6ebd2062a0b823db841a0b88baac4c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A destructor. <br /></td></tr>
<tr class="separator:ad6ebd2062a0b823db841a0b88baac4c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7277e94b38e6f196f34499a3e9996348"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7277e94b38e6f196f34499a3e9996348"></a>
const QVector&lt; float &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a7277e94b38e6f196f34499a3e9996348">getModelVerteces</a> () const </td></tr>
<tr class="memdesc:a7277e94b38e6f196f34499a3e9996348"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取模型顶点 <br /></td></tr>
<tr class="separator:a7277e94b38e6f196f34499a3e9996348"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada3d4d3d12d9b59be940584df5231cf9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada3d4d3d12d9b59be940584df5231cf9"></a>
const QVector&lt; float &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ada3d4d3d12d9b59be940584df5231cf9">getModelNormals</a> () const </td></tr>
<tr class="memdesc:ada3d4d3d12d9b59be940584df5231cf9"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取模型法向量 <br /></td></tr>
<tr class="separator:ada3d4d3d12d9b59be940584df5231cf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd605efc0857e7b3789981585e904196"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd605efc0857e7b3789981585e904196"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#afd605efc0857e7b3789981585e904196">getModelVertecesNum</a> (<a class="el" href="class_model.html#a997cd2b5b12b228bfbcdc1829e75352b">ModelType</a> modelType) const </td></tr>
<tr class="memdesc:afd605efc0857e7b3789981585e904196"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取模型顶点数目 <br /></td></tr>
<tr class="separator:afd605efc0857e7b3789981585e904196"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f3fd5b3fc2b7eb384a43c5467dd61fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f3fd5b3fc2b7eb384a43c5467dd61fd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a4f3fd5b3fc2b7eb384a43c5467dd61fd">resetValue</a> ()</td></tr>
<tr class="memdesc:a4f3fd5b3fc2b7eb384a43c5467dd61fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">重置机器人位置 <br /></td></tr>
<tr class="separator:a4f3fd5b3fc2b7eb384a43c5467dd61fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6481ca1940a8fc95128fc599f984b53b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6481ca1940a8fc95128fc599f984b53b"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a6481ca1940a8fc95128fc599f984b53b">CalcCurValue</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType, float spendSeconds, bool *reached)</td></tr>
<tr class="memdesc:a6481ca1940a8fc95128fc599f984b53b"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算指定部位当前位置 <br /></td></tr>
<tr class="separator:a6481ca1940a8fc95128fc599f984b53b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7546bab2ac5a2b61d0b67bf4037f47b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7546bab2ac5a2b61d0b67bf4037f47b1"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a7546bab2ac5a2b61d0b67bf4037f47b1">getCurValue</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType)</td></tr>
<tr class="memdesc:a7546bab2ac5a2b61d0b67bf4037f47b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前位置 <br /></td></tr>
<tr class="separator:a7546bab2ac5a2b61d0b67bf4037f47b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d2eb5dad350bc6c4e5c5c139c386962"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d2eb5dad350bc6c4e5c5c139c386962"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a2d2eb5dad350bc6c4e5c5c139c386962">setCurValue</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType, float value)</td></tr>
<tr class="memdesc:a2d2eb5dad350bc6c4e5c5c139c386962"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前位置 <br /></td></tr>
<tr class="separator:a2d2eb5dad350bc6c4e5c5c139c386962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23de1d1474c165434da6062cc10f7b19"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a23de1d1474c165434da6062cc10f7b19"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a23de1d1474c165434da6062cc10f7b19">addCurValue</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType, float value)</td></tr>
<tr class="memdesc:a23de1d1474c165434da6062cc10f7b19"><td class="mdescLeft">&#160;</td><td class="mdescRight">对当前位置添加指定的值 <br /></td></tr>
<tr class="separator:a23de1d1474c165434da6062cc10f7b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a988c677235850227b0282994e3fb1a48"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a988c677235850227b0282994e3fb1a48"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a988c677235850227b0282994e3fb1a48">setTargetValue</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType, float angle, float speed=-1)</td></tr>
<tr class="memdesc:a988c677235850227b0282994e3fb1a48"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置目标位置 <br /></td></tr>
<tr class="separator:a988c677235850227b0282994e3fb1a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb81699a23798935e5f5e83e804a8c3f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#adb81699a23798935e5f5e83e804a8c3f">setSpeed</a> (<a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a> actionType, float speed)</td></tr>
<tr class="memdesc:adb81699a23798935e5f5e83e804a8c3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置运动速度  <a href="#adb81699a23798935e5f5e83e804a8c3f">更多...</a><br /></td></tr>
<tr class="separator:adb81699a23798935e5f5e83e804a8c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a2af08d9c5e61fd4db1fce69ce2badabd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2af08d9c5e61fd4db1fce69ce2badabd"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>matrix_base</b></td></tr>
<tr class="separator:a2af08d9c5e61fd4db1fce69ce2badabd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea525ae8dde333edf43ea29b64e23b09"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea525ae8dde333edf43ea29b64e23b09"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>matrix_master</b></td></tr>
<tr class="separator:aea525ae8dde333edf43ea29b64e23b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa93bced170459938899a816b8c50455b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa93bced170459938899a816b8c50455b"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>matrix_assistant</b></td></tr>
<tr class="separator:aa93bced170459938899a816b8c50455b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cd241b7146cb659f1cd8e7109dd1cd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cd241b7146cb659f1cd8e7109dd1cd9"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>matrix_bar</b></td></tr>
<tr class="separator:a2cd241b7146cb659f1cd8e7109dd1cd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a0261ebfb0fdd46a242cded0b387d6c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a0261ebfb0fdd46a242cded0b387d6c"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>action_master</b></td></tr>
<tr class="separator:a2a0261ebfb0fdd46a242cded0b387d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcf0721253ac3ac8239706fb10c14f6a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abcf0721253ac3ac8239706fb10c14f6a"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>action_assistant</b></td></tr>
<tr class="separator:abcf0721253ac3ac8239706fb10c14f6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b619194a4f3693f567ba793cfefaea1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b619194a4f3693f567ba793cfefaea1"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>action_bar</b></td></tr>
<tr class="separator:a1b619194a4f3693f567ba793cfefaea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7bdcd7f21a340816db7dd8d5e34f3e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7bdcd7f21a340816db7dd8d5e34f3e0"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>action_bar_move</b></td></tr>
<tr class="separator:ad7bdcd7f21a340816db7dd8d5e34f3e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8666c9508a3b652b291da8a4eb7198fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8666c9508a3b652b291da8a4eb7198fa"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>center_base</b></td></tr>
<tr class="separator:a8666c9508a3b652b291da8a4eb7198fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91a1c012411db17700647dd3b67ca885"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91a1c012411db17700647dd3b67ca885"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>center_master</b></td></tr>
<tr class="separator:a91a1c012411db17700647dd3b67ca885"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc99744645ea3447cb75be2c3c2addcc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc99744645ea3447cb75be2c3c2addcc"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>center_assistant</b></td></tr>
<tr class="separator:afc99744645ea3447cb75be2c3c2addcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38dfc1bbb85eb6558ba212efcd2819af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a38dfc1bbb85eb6558ba212efcd2819af"></a>
QMatrix4x4&#160;</td><td class="memItemRight" valign="bottom"><b>center_bar</b></td></tr>
<tr class="separator:a38dfc1bbb85eb6558ba212efcd2819af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>机器人数据模型 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="adb81699a23798935e5f5e83e804a8c3f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Model::setSpeed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_model.html#a639d17254535dbda93359bed8722e6c7">ActionType</a>&#160;</td>
          <td class="paramname"><em>actionType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>speed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置运动速度 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">actionType</td><td>动作类型 </td></tr>
    <tr><td class="paramname">speed</td><td>速度(1-100) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="model_8h_source.html">model.h</a></li>
<li>model.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 四月 11日 星期六 16:06:06 , 为 SimpleRobot使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
